package xhwl.insurance.http.bean;


import xhwl.insurance.R;

public final class CheckState {
	public static final String STATUS_AUDITING = "0";// 审核中
	public static final String STATUS_PASS = "1";// 已通过
	public static final String STATUS_REFUSE = "2";// 审核未通过
	public static final String STATUS_INITIAL = "3";// 未提交申请表
	String code = "";

	public CheckState(String code) {
		this.code = code;
	}

	public String getMsg() {
		String msg = "";
		if (STATUS_AUDITING.equals(code)) {
			msg = "审核中";
		} else if (STATUS_PASS.equals(code)) {
			msg = "已通过";
		} else if (STATUS_REFUSE.equals(code)) {
			msg = "审核未通过";
		} else if (STATUS_INITIAL.equals(code)) {
			msg = "未提交申请表";
		}
		return msg;
	}

	public String getCode() {
		return code;
	}

	public int getTextColor() {
		if (code.equals(STATUS_AUDITING)) {
			return R.color.textred;
		} else if (code.equals(STATUS_PASS)) {
			return R.color.backcolor;
		} else if (code.equals(STATUS_REFUSE)) {
			return R.color.textgray;
		} else if (code.equals(STATUS_INITIAL)) {
			return R.color.textgray;
		}
		return R.color.black;
	}
	public boolean isPass(){
		return STATUS_PASS.equals(code);
	}
}
